package com.cpz.apiversion.controller;

import com.cpz.apiversion.annotation.Version;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author cpz
 * @since 2022/08/19
 */
@RestController
@RequestMapping("/version")
public class VersionController {

    @Deprecated
    @GetMapping()
    public String testV1() {
        return "v1";
    }

    @Version(value = 2, notes = "【20220819】新版本上线")
    @GetMapping()
    public String testV2() {
        return "v2";
    }

}


